//type
	//url
	//isAsyn
	//data:key1=value1&key2=value2...  ""
	//callBack
	function ajax(type, url, isAsyn, data, callBack) {
		let xhr;
		if (window.ActiveXObject) {
			//ie
			xhr = new ActiveXObject("Microsoft.XMLHttp");
		} else {
			//非ie
			xhr = new XMLHttpRequest();
		}

		type = type.toLowerCase();

		if (type == "get") {
			let urlParam = url;
			if (data != "") {
				//6ajaxFun.php?name=laowang&pwd=123
				urlParam += "?" + data;
			}
			xhr.open(type, urlParam, isAsyn);
			xhr.send();
		} else if (type == "post") {
			xhr.open(type, url, isAsyn);
			xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
			xhr.send(data);
		}

		xhr.onreadystatechange = function() {
			if (xhr.readyState == 4 && xhr.status == 200) {
				callBack(xhr.responseText);
			}
		}
	}